﻿<%@ Page Title="" Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ZLCMS.Web.Wap.Shop.Default" %>

<!DOCTYPE html>
<html>
<head>
<title>年货送到家</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1.0 ,user-scalable=no">
<link href="/Wap/lib/jquerymobile/css/jquery.mobile-1.4.0.min.css" rel="stylesheet" type="text/css" />
<script src="/Wap/lib/jquery/jquery-1.10.2.min.js"></script>
<script src="/Wap/lib/jquery/jquery.cookie.js"></script>
<script src="/Wap/lib/jquerymobile/jquery.mobile-1.4.0.min.js"></script>
<link rel="stylesheet" href="/Wap/shop/themes/myjqm.css" />
<link rel="stylesheet" href="/Wap/lib/jquerymobile/css/jquery.mobile.icons.min.css" />
<link rel="stylesheet" href="/Wap/lib/jquerymobile/css/jquery.mobile.structure-1.4.0.css" />   
<link href="css/dayhot.css" rel="stylesheet" type="text/css" />
<link href="/Wap/shop/css/my.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.xiaovstyle3 ul li{padding:0;}
.xiaovstyle3 ul li p.xvdesc{color:#999; margin-bottom:0; height: 16px;}
.xiaovstyle3 ul li p.xvdesc font{color:#f93a4c; margin: 0 2px;}
.xiaovstyle3 ul li p.xvtitle{margin-bottom: 0; font-size: 14px;padding: 0 5px; overflow: hidden; height: 20px;}
.xiaovstyle3 ul{padding:0;}
.xiaovstyle3 ul li > a > img{width:90%; }
.icons{width: 60px;height: 60px;background:#fff6ff; border-radius: 50%;margin: 0 auto;display: flex;align-items: center;}
.cpdetail {display:none}
</style>
</head>
<body>
<div data-role="page" id="currentorders" data-theme="b">
   <header data-role="header" data-position="fixed" class="nav-hed">
        <nav data-role="navbar">
            <div id="overflow">
                <div class="container">
                    <img src="images/pmlist.png" class="pmlist"/>
                    <a href="default.aspx" data-ajax="false"><span>首页</span></a>
                    <a href="#kind=nhlb" data-ajax="false" template="2" kind="nhlb"><span>年货礼包</span></a>
                    <a href="#kind=snsg" data-ajax="false" template="1" kind="snsg"><span>时令果蔬</span></a>
                    <a href="#kind=spxx" data-ajax="false" template="2" kind="spxx"><span>食品生鲜</span></a>
                    <a href="#kind=lszb" data-ajax="false" template="2" kind="lszb"><span>零食滋补</span></a>
                    <a href="#kind=lymm" data-ajax="false" template="1" kind="lymm"><span>粮油干货</span></a>
                    <a href="#kind=mcjs" data-ajax="false" template="2" kind="mcjs"><span>茗茶酒水</span></a>
                    <a href="#kind=jydq" data-ajax="false" template="2" kind="jydq"><span>家电家居</span></a>
                </div>
            </div>
        </nav>
    </header>
    <div data-role="content">

    <div id="list1">
     <!--年货礼包 -->
    <div kind="nhlb" style="display:none">
        <div style="text-align: center;">
            <img src="http://gdtvimg.weixinmvp.com/Upload/Home/NH17/cate/hblf.jpg" style="width:100%;display:block">
        </div>
        <div style="text-align: center; position: relative; height:60px;">
            <img src="images/title1.png?=j12" style="width:100%;display:block;position: relative;">
            <p style="font-size:16px;color:#f93a4c;position: absolute; top: 10px; text-align: center; width: 100%;">小V推荐</p>
            <p style="font-size:14px;color:#999999;position: absolute; text-align: center; top: 30px; width: 100%;">精选年货豪礼</p>
        </div>
        <div class="xiaovstyle3" style="border:none;">
            <ul class="xiaovtuijian">
            </ul>
        </div>
        <div style="text-align: center; position: relative; height: 100px;display:none">
            <img src="images/title1.png?=j12" style="width:100%;display:block;position: relative;">
            <p style="font-size:18px;color:#f93a4c;position: absolute;left: 50%;top: 20px;;margin-left: -40px;">年货热卖</p>
            <p style="font-size:14px;color:#999999;position: absolute;left: 50%;top: 45px;margin-left:-80px;">在家用到的都是最便利的</p>
        </div>
        <div class="cpdetail">
            <ul class="addata">
            </ul>
        <div style="display:none">
            <button id="Button1" data-icon="refresh" style="width: 95%; margin-left: auto; margin-right: auto;">显示更多</button>
        </div>
        </div>
    </div>


    <!--时令果蔬 -->
    <div kind="snsg" style="display:none">
        <div style="text-align: center;">
            <img src="http://gdtvimg.weixinmvp.com/Upload/Home/NH17/cate/10_18.gif" style="width:100%;display:block">
        </div>
        <div style="text-align: center; position: relative; height:60px; margin-top: 10px;">
            <img src="images/title1.png?=j12" style="width:100%;display:block;position: relative;">
            <p style="font-size:16px;color:#f93a4c;position: absolute; top: 10px; text-align: center; width: 100%;">小V推荐</p>
            <p style="font-size:14px;color:#999999;position: absolute; text-align: center; top: 30px; width: 100%;">品味新鲜水果，美味犒劳自己</p>
        </div>
        <ul class="smlist addata">
        </ul>
        <div style="display:none">
            <button id="btnMore" data-icon="refresh" style="width: 95%; margin-left: auto; margin-right: auto;">显示更多</button>
        </div>

    </div>

     <!--食品新鲜 -->
    <div kind="spxx" style="display:none">
        <div style="text-align: center;">
            <img src="http://gdtvimg.weixinmvp.com/Upload/Home/NH17/cate/10_06.gif" style="width:100%;display:block">
        </div>
        <div>
            <ul class="smnav">
                <li onclick="location.href='/Wap/Shop/productlist.aspx?categoryid=186'" data-ajax="false">
                    <div class="icons">
                      <img src="images/kind1701/spxx2.png" alt=""><br>
                    </div>
                    <span>鱼虾蟹贝</span>
                </li>
                <li onclick="location.href='/Wap/Shop/productlist.aspx?categoryid=187'" data-ajax="false">
                    <div class="icons">
                      <img src="images/kind1701/spxx3.png" alt=""><br>
                    </div>
                    <span>猪牛羊肉</span>
                </li>
                <li onclick="location.href='/Wap/Shop/productlist.aspx?categoryid=182'" data-ajax="false">
                    <div class="icons">
                      <img src="images/kind1701/spxx6.png" alt=""><br>
                    </div>
                    <span>冷冻速食</span>
                </li>
                <li onclick="location.href='/Wap/Shop/productlist.aspx?categoryid=179'" data-ajax="false">
                    <div class="icons">
                      <img src="images/kind1701/spxx5.png" alt=""><br>
                    </div>
                    <span>海产干货</span>
                </li>
            </ul>
        </div>
        <div style="text-align: center; position: relative; height:60px;">
            <img src="images/title1.png?=j12" style="width:100%;display:block;position: relative;">
            <p style="font-size:16px;color:#f93a4c;position: absolute; top: 10px; text-align: center; width: 100%;">小V推荐</p>
            <p style="font-size:14px;color:#999999;position: absolute; text-align: center; top: 30px; width: 100%;">过年吃点好东西</p>
        </div>
        <div class="xiaovstyle3" style="border:none;">
            <ul class="xiaovtuijian">
            </ul>
        </div>
        <div style="text-align: center; position: relative; height: 100px; display:none">
            <img src="images/title1.png?=j12" style="width:100%;display:block;position: relative;">
            <p style="font-size:18px;color:#f93a4c;position: absolute;left: 50%;top: 20px;;margin-left: -40px;">年货热卖</p>
            <p style="font-size:14px;color:#999999;position: absolute;left: 50%;top: 45px;margin-left:-80px;">在家用到的都是最便利的</p>
        </div>
        <div class="cpdetail">
            <ul class="addata">
            </ul>
        <div style="display:none">
            <button id="btnMore" data-icon="refresh" style="width: 95%; margin-left: auto; margin-right: auto;">显示更多</button>
        </div>
        </div>

    </div>
    
     <!--零食滋补 -->
    <div kind="lszb" style="display:none">
        <div style="text-align: center;">
            <img src="http://gdtvimg.weixinmvp.com/Upload/Home/NH17/cate/10_16.gif" style="width:100%;display:block">
        </div>
        <div>
            <ul class="smnav">
                <li onclick="location.href='/Wap/Shop/productlist.aspx?categoryid=198'" data-ajax="false">
                    <div class="icons">
                      <img src="images/kind1701/lszb8.png" alt=""><br>
                    </div>
                    <span>坚果干果</span>
                </li>
                <li onclick="location.href='/Wap/Shop/productlist.aspx?categoryid=197'" data-ajax="false">
                    <div class="icons">
                      <img src="images/kind1701/lszb6.png" alt=""><br>
                    </div>
                    <span>饼干</span>
                </li>
                <li onclick="location.href='/Wap/Shop/productlist.aspx?categoryid=196'" data-ajax="false">
                    <div class="icons">
                      <img src="images/kind1701/lszb2.png" alt=""><br>
                    </div>
                    <span>巧克力</span>
                </li>
                <li onclick="location.href='/Wap/Shop/productlist.aspx?categoryid=199'" data-ajax="false">
                    <div class="icons">
                      <img src="images/kind1701/lszb7.png" alt=""><br>
                    </div>
                    <span>零食</span>
                </li>
                <li onclick="location.href='/Wap/Shop/productlist.aspx?categoryid=152'" data-ajax="false">
                    <div class="icons">
                      <img src="images/kind1701/lszb4.png" alt=""><br>
                    </div>
                    <span>滋补养生</span>
                </li>
            </ul>
        </div>
        <div style="text-align: center; position: relative; height:60px;">
            <img src="images/title1.png?=j12" style="width:100%;display:block;position: relative;">
            <p style="font-size:16px;color:#f93a4c;position: absolute; top: 10px; text-align: center; width: 100%;">小V推荐</p>
            <p style="font-size:14px;color:#999999;position: absolute; text-align: center; top: 30px; width: 100%;">美味快到碗里来</p>
        </div>
        <div class="xiaovstyle3" style="border:none;">
            <ul class="xiaovtuijian">
            </ul>
        </div>
        <div style="text-align: center; position: relative; height: 100px;display:none">
            <img src="images/title1.png?=j12" style="width:100%;display:block;position: relative;">
            <p style="font-size:18px;color:#f93a4c;position: absolute;left: 50%;top: 20px;;margin-left: -40px;">年货热卖</p>
            <p style="font-size:14px;color:#999999;position: absolute;left: 50%;top: 45px;margin-left:-80px;">在家用到的都是最便利的</p>
        </div>
        <div class="cpdetail">
            <ul class="addata">
            </ul>
        <div style="display:none">
            <button id="btnMore" data-icon="refresh" style="width: 95%; margin-left: auto; margin-right: auto;">显示更多</button>
        </div>
        </div>
    </div>

    <!--粮油米面 -->
    <div kind="lymm" style="display:none">
        <div style="text-align: center;">
            <img src="http://gdtvimg.weixinmvp.com/Upload/Home/NH17/cate/10_04.gif" style="width:100%;display:block">
        </div>
        <div>
            <ul class="smnav">
                <li onclick="location.href='/Wap/Shop/productlist.aspx?categoryid=181'" data-ajax="false">
                    <div class="icons">
                      <img src="images/kind1701/lymm1.png" alt=""><br>
                    </div>
                    <span>腊味</span>
                </li>
                <li onclick="location.href='/Wap/Shop/productlist.aspx?categoryid=178'" data-ajax="false">
                    <div class="icons">
                      <img src="images/kind1701/lymm2.png" alt=""><br>
                    </div>
                    <span>山珍</span>
                </li>
                <li onclick="location.href='/Wap/Shop/productlist.aspx?categoryid=161'" data-ajax="false">
                    <div class="icons">
                      <img src="images/kind1701/lymm3.png" alt=""><br>
                    </div>
                    <span>五谷杂粮</span>
                </li>
                <li onclick="location.href='/Wap/Shop/productlist.aspx?categoryid=175'" data-ajax="false">
                    <div class="icons">
                      <img src="images/kind1701/lymm4.png" alt=""><br>
                    </div>
                    <span>油</span>
                </li>
            </ul>
        </div>
        <div style="text-align: center; position: relative; height:60px;">
            <img src="images/title1.png?=j12" style="width:100%;display:block;position: relative;">
            <p style="font-size:16px;color:#f93a4c;position: absolute; top: 10px; text-align: center; width: 100%;">小V推荐</p>
            <p style="font-size:14px;color:#999999;position: absolute; text-align: center; top: 30px; width: 100%;">人是铁饭是钢，为您人生加点油</p>
        </div>
        <div class="xiaovstyle3" style="border:none;">
            <ul class="xiaovtuijian">
            </ul>
        </div>
        <div style="text-align: center; position: relative; height: 100px;display:none">
            <img src="images/title1.png?=j12" style="width:100%;display:block;position: relative;">
            <p style="font-size:18px;color:#f93a4c;position: absolute;left: 50%;top: 20px;;margin-left: -40px;">年货热卖</p>
            <p style="font-size:14px;color:#999999;position: absolute;left: 50%;top: 45px;margin-left:-80px;">在家用到的都是最便利的</p>
        </div>
        <div class="cpdetail">
            <ul class="addata">
            </ul>
        <div style="display:none">
            <button id="btnMore" data-icon="refresh" style="width: 95%; margin-left: auto; margin-right: auto;">显示更多</button>
        </div>
        </div>
    </div>

     <!--茗茶酒水 -->
    <div kind="mcjs" style="display:none">
        <div style="text-align: center;">
            <img src="http://gdtvimg.weixinmvp.com/Upload/Home/NH17/cate/10_08.gif" style="width:100%;display:block">
        </div>
        <div>
            <ul class="smnav">
                <li onclick="location.href='/Wap/Shop/productlist.aspx?categoryid=194'" data-ajax="false">
                    <div class="icons">
                      <img src="images/kind1701/mcjs1.png" alt=""><br>
                    </div>
                    <span>茗茶</span>
                </li>
                <li onclick="location.href='/Wap/Shop/productlist.aspx?categoryid=192'" data-ajax="false">
                    <div class="icons">
                      <img src="images/kind1701/mcjs3.png" alt=""><br>
                    </div>
                    <span>柑普茶</span>
                </li>
                <li onclick="location.href='/Wap/Shop/productlist.aspx?categoryid=158'" data-ajax="false">
                    <div class="icons">
                      <img src="images/kind1701/mcjs2.png" alt=""><br>
                    </div>
                    <span>红酒</span>
                </li>
                <li onclick="location.href='/Wap/Shop/productlist.aspx?categoryid=200'" data-ajax="false">
                    <div class="icons">
                      <img src="images/kind1701/mcjs4.png" alt=""><br>
                    </div>
                    <span>咖啡</span>
                </li>
            </ul>
        </div>
        <div style="text-align: center; position: relative; height:60px;">
            <img src="images/title1.png?=j12" style="width:100%;display:block;position: relative;">
            <p style="font-size:16px;color:#f93a4c;position: absolute; top: 10px; text-align: center; width: 100%;">小V推荐</p>
            <p style="font-size:14px;color:#999999;position: absolute; text-align: center; top: 30px; width: 100%;">贵在御品尊，妙在自然醇</p>
        </div>
        <div class="xiaovstyle3" style="border:none;">
            <ul class="xiaovtuijian">
            </ul>
        </div>
        <div style="text-align: center; position: relative; height: 100px;display:none">
            <img src="images/title1.png?=j12" style="width:100%;display:block;position: relative;">
            <p style="font-size:18px;color:#f93a4c;position: absolute;left: 50%;top: 20px;;margin-left: -40px;">年货热卖</p>
            <p style="font-size:14px;color:#999999;position: absolute;left: 50%;top: 45px;margin-left:-80px;">在家用到的都是最便利的</p>
        </div>
        <div class="cpdetail">
            <ul class="addata">
            </ul>
        <div style="display:none">
            <button id="btnMore" data-icon="refresh" style="width: 95%; margin-left: auto; margin-right: auto;">显示更多</button>
        </div>
        </div>
    </div>

     <!--家用电器 -->
    <div kind="jydq" style="display:none">
        <div style="text-align: center;">
            <img src="http://gdtvimg.weixinmvp.com/Upload/Home/NH17/cate/10_14.gif" style="width:100%;display:block">
        </div>
        <div>
            <ul class="smnav">
                <li onclick="location.href='/Wap/Shop/productlist.aspx?categoryid=190'" data-ajax="false">
                    <div class="icons">
                    <img src="images/kind1701/jydq1.png" alt=""><br>
                    </div>
                    <span>按摩养生</span>
                </li>
                <li onclick="location.href='/Wap/Shop/productlist.aspx?categoryid=189'" data-ajax="false">
                    <div class="icons">
                    <img src="images/kind1701/jydq2.png" alt=""><br>
                    </div>
                    <span>清洁电器</span>
                </li>
                <li onclick="location.href='/Wap/Shop/productlist.aspx?categoryid=188'" data-ajax="false">
                    <div class="icons">
                    <img src="images/kind1701/jydq3.png" alt=""><br>
                    </div>
                    <span>厨卫电器</span>
                </li>
                <li onclick="location.href='/Wap/Shop/productlist.aspx?categoryid=191'" data-ajax="false">
                    <div class="icons">
                    <img src="images/kind1701/jydq4.png" alt=""><br>
                    </div>
                    <span>养颜个护</span>
                </li>
            </ul>
            <ul class="smnav">
                <li onclick="location.href='/Wap/Shop/productlist.aspx?categoryid=160'" data-ajax="false">
                    <div class="icons">
                      <img src="images/kind1701/jjjz1.png" alt=""><br>
                    </div>
                    <span>餐具厨具</span>
                </li>
                <li onclick="location.href='/Wap/Shop/productlist.aspx?categoryid=183'" data-ajax="false">
                    <div class="icons">
                      <img src="images/kind1701/jjjz4.png" alt=""><br>
                    </div>
                    <span>生活日用</span>
                </li>
                <li onclick="location.href='/Wap/Shop/productlist.aspx?categoryid=184'" data-ajax="false">
                    <div class="icons">
                      <img src="images/kind1701/jjjz6.png" alt=""><br>
                    </div>
                    <span>枕头</span>
                </li>
            </ul>
        </div>
        <div style="text-align: center; position: relative; height:60px;">
            <img src="images/title1.png?=j12" style="width:100%;display:block;position: relative;">
            <p style="font-size:16px;color:#f93a4c;position: absolute; top: 10px; text-align: center; width: 100%;">小V推荐</p>
            <p style="font-size:14px;color:#999999;position: absolute; text-align: center; top: 30px; width: 100%;">生活其实可以更好的</p>
        </div>
        <div class="xiaovstyle3 " style="border:none;">
            <ul class="xiaovtuijian">
            </ul>
        </div>
        <div style="text-align: center; position: relative; height: 100px;display:none">
            <img src="images/title1.png?=j12" style="width:100%;display:block;position: relative;">
            <p style="font-size:18px;color:#f93a4c;position: absolute;left: 50%;top: 20px;;margin-left: -40px;">年货热卖</p>
            <p style="font-size:14px;color:#999999;position: absolute;left: 50%;top: 45px;margin-left:-80px;">在家用到的都是最便利的</p>
        </div>
        <div class="cpdetail">
            <ul class="addata">
            </ul>
        <div style="display:none">
            <button id="btnMore" data-icon="refresh" style="width: 95%; margin-left: auto; margin-right: auto;">显示更多</button>
        </div>
        </div>
    </div>

    </div>
</div>
    <div data-role="footer" data-position="fixed" data-tap-toggle="false">
        <ul class="footer shop">
            <li><a href="/Wap/Shop/Default.aspx" data-ajax="false" class="active"><div></div><p>首页</p></a></li>
            <li><a href="/Wap/Shop/Category.aspx" data-ajax="false"><div></div><p>分类</p></a></li>
            <li><a href="http://dvms.weixinmvp.com/Wap/Seckill/default.aspx" data-ajax="false"><div></div><p>秒杀</p></a></li>
            <li><a href="/Wap/Shop/ShoppingCart.aspx" data-ajax="false"><div></div><p>购物车</p></a></li>
            <li><a href="/wap/shop/MemberDefault.aspx" data-ajax="false"><div></div><p>我</p></a></li>
        </ul>

    </div>

<script src="/Wap/lib/command/Command.js" type="text/javascript"></script>
<script src="/Wap/lib/jquery/jquery.json-2.2.min.js" type="text/javascript"></script>
<script src="/Wap/lib/common/querymobile.alertMsg.js?v=11"></script>
<script src="/wap/lib/common/listviewHandler.js" type="text/javascript"></script>
<script src="/Wap/lib/jquery_lazyload/jquery.lazyload.min.js" type="text/javascript"></script>
<script type="text/javascript" src="/wap/lib/iscroll-5/iscroll.js"></script>
<script src="/wap/lib/common/loaderHandler.js" type="text/javascript"></script>
<script>

    window.addEventListener("popstate", function (e) {
        var url =  history.state.url;
        var req = new UrlSearch(url);
        var kind = req.kind;
        changeList($('a[kind=' + kind + ']'));
        //alert(currentState);
    });
    function UrlSearch(url) {
        var addr = url;
        if (!addr) { addr = location.href };
        var name, value;
        var str = addr; //取得整个地址栏
        var num = str.indexOf("#");
        //if (num == -1) {
        //    num = str.indexOf("#");  
        //}
        str = str.substr(num + 1); //取得所有参数   stringvar.substr(start [, length ]

        var arr = str.split("&"); //各个参数放到数组里
        for (var i = 0; i < arr.length; i++) {
            num = arr[i].indexOf("=");
            if (num > 0) {
                name = arr[i].substring(0, num);
                value = arr[i].substr(num + 1);
                this[name] = value;
            }
        }
    }
    var Request = new UrlSearch();
    
   
    function changeList(ui) {

        $('#list1 div[kind]').hide();
        $('#list1 div[kind=' + ui.attr('kind') + ']').show();

        $('a[kind]').removeClass("active");
        ui.addClass("active");

        $('div[kind=' + ui.attr('kind') + '] .addata').empty();

        initializePage();
        queryData();
    }

    function getQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return unescape(r[2]); return null;

    }

    function initializePage() {
        $('.xiaovtuijian').empty();
        var handler = $('.xiaovtuijian').loaderHandler();
        var kind = $('a[kind].active').attr("kind");
        handler.initialize({
            command: 'Pub.LoadAdProduct',
            parameter: { PositionCode: 'CATE_TJ_' + kind, PageSize: 15 },
            afterHandleResult: function (result, totalCount, container) {
                var itemxiaovstyle4 = '<li>'+
                 '<p class="xvtitle">{Title}</p>' +
                    '<p class="xvdesc">{Description}</p>' +
                    '<a data-ajax="false" href="{Url}">' +
                    '<img src="{PhotoUrl}"></a>' +
                    '<div style="display:none"><i>已售<em>{Param2}</em></i></div>'+
                '</li>';
                $(result.List).each(function () {
                    this.PhotoUrl = firstFilePath(this.PhotoUrl);
                    $('.xiaovtuijian').append(itemxiaovstyle4.format(this));
                });
            }
        });
        handler.load();
    }
    function queryData() {
        var kind = $('a[kind].active').attr("kind");

        //获取当前激活元素对应的模板id
        var template = $('a[kind].active').attr("template");

        var itemTemp = '';
        if (template == '1') {
            itemTemp = '<li onclick="location.href=\'{Url}\'" data-ajax="false">' + '<img src="{FilePath}">' + '<div class="smright"><h5>{Title}</h5><span class="describe">{Description}</span><span class="old">市场价：￥{Param3}</span><p>年货价：￥<strong>{Param2}</strong></p><a href="{Url}" target="_blank" data-ajax="false" class="smbtn">我要购买</a>' + '</div>' + '</li>';
        } else {
            itemTemp = '<li onclick="location.href=\'{Url}\'" data-ajax="false">' + '<img src="{FilePath}">' + '<p class="dateilname" style="display:block">{Title}</p>' + '<span class="now">￥{Param2}</span><span class="old">￥{Param3}</span>' + '</li>';
        }

        var ui = $('div[kind=' + kind + '] .addata');
        var handler = ui.listviewHandler();
        handler.initialize({
            loaderBtn: $( '#btnMore', $('div[kind=' + kind + ']')), //加载数据按钮（点击加载下一页）
            emptyHtml: '无记录', //无记录时显示此html
            itemTemplate: itemTemp, //项模板
            pageIndex: 1, //页码（从1起算）
            pageSize: 12, //页大小
            totalCount: 999, //总记录数
            itemHandler: function (data, itemTemplate, container) {//数据各项处理
                data.FilePath = firstFilePath(data.PhotoUrl);
                return itemTemplate.format(data);
            },
            command: 'Pub.LoadAdProduct',
            parameter: { PositionCode: 'CATE_HOT_' + kind }
        });
        handler.nextPage();
    }

    $(function () {     
        $(window).scroll(function () {
            //当内容滚动到底部时加载新的内容

            if ($(this).scrollTop() + $(window).height() + 10 >= $(document).height() && $(this).scrollTop() > 10) {

                var kind = $('a[kind].active').attr("kind");
                var uiContainer = $('div[kind=' + kind + ']');

                //当前要加载的页码
                $('#btnMore', uiContainer).click();
            }
        });

        //获取kind
        var kind = Request.kind;
        changeList($('a[kind=' + kind + ']'));
        $('#overflow').scrollLeft($('#overflow .container a.active').offset().left);

    });
</script>

</body>
</html>
